Skip to content

fix(runtime-host): update existing WSL deployments on re-add - #4095

Merged
M4n5ter merged 1 commit into
mainfrom
fix/wsl-readd-existing-deployment
Aug 28, 2026
Merged

fix(runtime-host): update existing WSL deployments on re-add#4095
M4n5ter merged 1 commit into
mainfrom
fix/wsl-readd-existing-deployment

Conversation

@M4n5ter

@M4n5ter M4n5ter commented Aug 28, 2026

Copy link
Copy Markdown
Member

Summary

Re-adding a WSL environment now updates its existing on-demand Runtime Host deployment before pairing when the requested exact package changed.

  • keep ordinary setup fail-closed unless exact-package replacement is explicitly authorized
  • let Desktop WSL onboarding request the update workflow
  • stage and activate the replacement inside the existing lifecycle transaction, preserving rollback before pruning the known-good package
  • keep identical-package re-onboarding idempotent
中文说明

重新添加 WSL 环境时,如果所需 exact package 已变化,现在会先更新已有的 on-demand Runtime Host deployment,再完成配对。

  • 普通 setup 仍默认拒绝替换 exact package,只有显式授权才会更新
  • Desktop 的 WSL onboarding 显式请求该更新流程
  • 新 package 的 stage 与 activation 纳入现有 lifecycle transaction;确认成功前保留旧的 known-good package,失败时回滚
  • exact package 未变化时继续保持幂等

Verification

  • full workspace build
  • focused setup transaction and CLI parser tests — 2 passed
  • lint and format checks
  • Windows development Desktop re-added a WSL environment retaining an older exact deployment, updated it from 0.2.0-dev-0948dbb35bb4 to 0.2.0-dev-a7429997efe3, and completed a real session with WSL_READD_UPDATE_OK
中文验证说明
  • 完整 workspace build 通过
  • setup transaction 与 CLI parser 两条关键测试通过
  • lint 与 format 检查通过
  • Windows 开发版 Desktop 重新添加保留旧 exact deployment 的 WSL 环境,成功从 0.2.0-dev-0948dbb35bb4 更新到 0.2.0-dev-a7429997efe3,并完成真实 session,返回 WSL_READD_UPDATE_OK

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Codex diagnosed the WSL re-onboarding lifecycle mismatch, implemented the transactional update authorization, and added focused verification.

Checklist

  • Tests cover the changed behavior
  • Build, lint, format, and affected tests pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@M4n5ter M4n5ter self-assigned this Aug 28, 2026
@github-actions github-actions Bot added the effort/M Under 500 readable lines label Aug 28, 2026

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed exact head 1d7e922ba3b52c49834c48d1fc7493c281eb9dc8 and found no blocking issues.

The update permission remains explicit and narrow: ordinary setup still rejects a changed exact package, while Desktop WSL re-onboarding opts into replacement. A changed package is staged in the existing deployment root and passed through the managed lifecycle transaction, whose failure path restores the previous authority and rolls back the candidate package before pruning. Identical-package re-onboarding remains idempotent.

The branch is based directly on the current main, and the merge result is clean. The full workspace test build passed locally, as did the affected setup, service-manager, WSL-package, and lifecycle-rollback tests (34/34). Hosted package validation is green across the completed platforms; the general test job was still running when I submitted this approval.


Posted by an automated review agent operated by @WAWQAQ. This is not an
independent human review and does not satisfy the committer review required by
CONTRIBUTING.md. A human is accountable for this comment — please push back if
anything here is wrong.

简体中文

本条评论由 @WAWQAQ 运行的自动化审查程序发出。它不构成 CONTRIBUTING.md
所要求的独立人类审查,也不能替代人类审查。有人类对本条评论负责,如有错误请直接指出。

@M4n5ter
M4n5ter merged commit 1975adb into main Aug 28, 2026
13 checks passed
@M4n5ter
M4n5ter deleted the fix/wsl-readd-existing-deployment branch August 28, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/M Under 500 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants